import request from "@/util/request";

export function getFlashSale(dto){
    return request({
        method:'get',
        url:"/flashSales",
        params:dto
    })
}
export function getFlashSaleSkuBySessionId(dto){
    return request({
        method:'get',
        url:"/flashSales",
        params:dto
    })
}

export function saveFlashSale(data){
    return request({
        method:'post',
        url:"/flashSales",
        data
    })
}

export function saveFlashSaleSku(data){
    return request({
        method:'post',
        url:"/flashSaleSku",
        data
    })
}
export function getFlashSaleSku(searchDTO){
    return request({
        method:'get',
        url:"/flashSaleSku",
        params:searchDTO
    })
}
export function getFlashSaleById(id){
    return request({
        method:'get',
        url:"/flashSales/"+id,
    })
}
export function updateFlashSale(data){
    return request({
        method:'put',
        url:"/flashSales/",
        data
    })
}
export function upSessionSku(sessionId){
    return request({
        method:'post',
        url:"/flashSaleSku/up/sku/session/"+sessionId,
    })
}

